<div class="card border-info m-3">
    <h5 class="card-header bg-info text-white">修改</h5>
    <div class="card-body">
        <h5 class="card-title">基础信息</h5>
        <p class="card-text">请按内容提示，录入相关信息。</p>
        <div class="row mb-3">
            <div class="col-6">
                <div class="input-group">
                    <div class="input-group-prepend w-25">
                        <button class="btn btn-info border-info w-100" type="button">编号</button>
                    </div>
                    <input type="text" class="form-control border-info" [(ngModel)]="domain.serNum">
                </div>
                <span class="badge badge-danger" *ngIf="errRes.error?.detail['WmsWarehouseManage.serNum'] !== null">{{errRes.error?.detail['WmsWarehouseManage.serNum']}}</span>
            </div>
            <div class="col-6">
                <div class="input-group">
                        <div class="input-group-prepend w-25">
                                <button *ngIf="showHouseAreaLabel; else elseBlock" class="btn btn-info border-info w-100" type="button">
                                    库区名称
                                </button>
                                <ng-template #elseBlock>
                                    <button class="btn btn-info border-info w-100" type="button">仓库名称</button>
                                </ng-template>
                        </div>
                    <input type="text" class="form-control border-info" [(ngModel)]="domain.serName">
                </div>
            </div>
        </div>

        <div class="row mb-3" *ngIf="domain.upper">
            <div class="col-6">
                <ng-select [items]="extend.domain.serType.items" bindLabel="name" bindValue="id" [searchable]="true"
                [(ngModel)]="domain.serAreaType"
                [multiple]="false" [closeOnSelect]="true" placeholder="{{extend.domain.serType.nickname}}"
                tooltip="{{extend.domain.serType.nickname}}" (change)="extend.domain.serType.change($event)">
            </ng-select>
            </div>
        </div>
        <div class="row mb-3">
            <div class="col-6">
                <ng-select [items]="extend.domain.serArea.items" bindLabel="name" bindValue="id" [searchable]="true"
                [(ngModel)]="domain.serArea"
                [multiple]="false" [closeOnSelect]="true" placeholder="{{extend.domain.serArea.nickname}}"
                tooltip="{{extend.domain.serArea.nickname}}" (change)="extend.domain.serArea.change($event)">
            </ng-select>
            <span class="badge badge-danger" *ngIf="errRes.error?.detail['WmsWarehouseManage.serArea'] !== null">{{errRes.error?.detail['WmsWarehouseManage.serArea']}}</span>
            </div>
            <div class="col-6">
                <div class="input-group">
                    <div class="input-group-prepend w-25">
                        <button class="btn btn-info border-info w-100" type="button">详细地址</button>
                    </div>
                    <input type="text" class="form-control border-info" [(ngModel)]="domain.serAddress">
                </div>
                <span class="badge badge-danger" *ngIf="errRes.error?.detail['WmsWarehouseManage.serAddress'] !== null">{{errRes.error?.detail['WmsWarehouseManage.serAddress']}}</span>
            </div>
        </div>
        <div class="row mb-3">
                <div class="col-6">
                        <div class="input-group">
                            <div class="input-group-prepend w-25">
                                <button class="btn btn-info border-info w-100" type="button">联系人</button>
                            </div>
                            <input type="text" class="form-control border-info" [(ngModel)]="domain.serLinkman">
                        </div>
                        <span class="badge badge-danger" *ngIf="errRes.error?.detail['WmsWarehouseManage.serNum'] !== null">{{errRes.error?.detail['WmsWarehouseManage.serLinkman']}}</span>
                </div> 
                <div class="col-6">
                        <div class="input-group">
                            <div class="input-group-prepend w-25">
                                <button class="btn btn-info border-info w-100" type="button">联系方式</button>
                            </div>
                            <input type="text" class="form-control border-info" [(ngModel)]="domain.serContact">
                        </div>
                        <span class="badge badge-danger" *ngIf="errRes.error?.detail['WmsWarehouseManage.serNum'] !== null">{{errRes.error?.detail['WmsWarehouseManage.serContact']}}</span>
                </div>   
        </div>
        <div class="text-center mt-5">
            <input type="text" class="form-control border-info" style="display: none" [(ngModel)]="domain.upper">
            <button type="button" class="btn btn-outline-primary" (click)="func.update.req($event)">Save</button>
        </div>
    </div>
</div>

<span class="badge badge-info mr-3" *ngIf="errRes?.error?.timestamp !== null">response time: {{errRes?.error?.timestamp}}</span>
<div *ngIf="false">
    <p>{{errRes.error}}</p>
    <p>{{errRes.error?.code}}</p>
    <p>{{errRes.error?.description}}</p>
    <p>{{errRes.error?.theme}}</p>
    <p>{{errRes.error?.timestamp}}</p>
    <p>{{errRes.error?.detail?.RR?.duration}}</p>
    <p>{{errRes.error?.detail['WmsWarehouseManage.serNum']}}</p>
    <p>{{errRes.error?.detail['WmsWarehouseManage.serAudit']}}</p>
    <p>{{errRes.error?.detail['WmsWarehouseManage.serValid']}}</p>
    <p>{{errRes.error?.detail['WmsWarehouseManage.serValid2']}}</p>
    <p>{{errRes.headers}}</p>
    <p>{{errRes.message}}</p>
    <p>{{errRes.name}}</p>
    <p>{{errRes.ok}}</p>
    <p>{{errRes.status}}</p>
    <p>{{errRes.statusText}}</p>
    <p>{{errRes.url}}</p>
</div>
